@props([
    'breadcrumbs' => [],
])

@if (count($breadcrumbs) > 1)
    <nav class="flex px-6 py-2">
        <ol class="flex items-center space-x-2 text-sm">
            @foreach ($breadcrumbs as $url => $label)
                @if (!$loop->last)
                    <li>
                        <a href="{{ is_int($url) ? '#' : $url }}"
                           class="text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300">
                            {{ $label }}
                        </a>
                    </li>
                    <li>
                        <x-filament::icon
                                icon="heroicon-m-chevron-right"
                                class="h-4 w-4 text-gray-400"
                        />
                    </li>
                @else
                    <li class="font-medium text-gray-900 dark:text-white">
                        {{ $label }}
                    </li>
                @endif
            @endforeach
        </ol>
    </nav>
@endif

